Page({
    data: {
        activeTab: 'all',
        activeNav: 'order'
    },
    onOrderTap: function(e) {
        const status = e.currentTarget.dataset.status;
        let url = '';
        switch (status) {
          case '待付款':
            url = '/pages/order-pending/order-pending'; // 确保这是正确的页面路径
            break;
          case '待接单':
            url = '/pages/order-waiting/order-waiting'; // 确保这是正确的页面路径
            break;
          case '已取消':
            url = '/pages/order-cancelled/order-cancelled'; // 确保这是正确的页面路径
            break;
          case '已完成':
            url = '/pages/order-completed/order-completed'; // 确保这是正确的页面路径
            break;
        }
        if (url) {
          wx.navigateTo({
            url: url
          });
        }
      },
      onSystemTap: function(e) {
        const url = e.currentTarget.dataset.url;
        if (url) {
          wx.navigateTo({
            url: url
          });
        }
      }
    });
